Build fixes and move set_current() earlier in boot (Charles Coffing).
if ( unlikely(e->tot_pages == e->max_pages) ||
unlikely(!gnttab_prepare_for_transfer(e, d, gntref)) )
{
- MEM_LOG("Transferee has no reservation headroom (%ld,%ld), or "
+ MEM_LOG("Transferee has no reservation headroom (%d,%d), or "
"provided a bad grant ref.\n", e->tot_pages, e->max_pages);
spin_unlock(&e->page_alloc_lock);
put_domain(e);
page = &frame_table[pde >> PAGE_SHIFT];
/* assert that page is an l1_page_table XXXcl maybe l2? */
if ( (page->u.inuse.type_info & PGT_type_mask) != PGT_l1_page_table ) {
- MEM_LOG("ptwr: Inconsistent pagetable: pde %x is not an l1 page\n",
+ MEM_LOG("ptwr: Inconsistent pagetable: pde %lx not an l1 page\n",
pde >> PAGE_SHIFT);
domain_crash();
}
}
}
+ /* Must do this early -- e.g., spinlocks rely on get_current(). */
+ set_current(&idle0_task);
+
/* We initialise the serial devices very early so we can get debugging. */
serial_init_stage1();
for ( ; ; ) ;
}
- set_current(&idle0_task);
-
xenheap_phys_end = opt_xenheap_megabytes << 20;
max_mem = max_page = (mbi->mem_upper+1024) >> (PAGE_SHIFT - 10);
void disable_criticalregion_checking(void)
{
int cpu = smp_processor_id();
- ASSERT(crit_checking_disabled[cpu] >= 0);
crit_checking_disabled[cpu]++;
}
-void enable_criticalregion_checking(void)
-{
- int cpu = smp_processor_id();
- crit_checking_disabled[cpu]--;
- ASSERT(crit_checking_disabled[cpu] >= 0);
-}
-
void criticalregion_enter(void)
{
int cpu = smp_processor_id();
+ if ( crit_checking_disabled[cpu] )
+ return;
ASSERT(crit_count[cpu] >= 0);
crit_count[cpu]++;
}
void criticalregion_exit(void)
{
int cpu = smp_processor_id();
+ if ( crit_checking_disabled[cpu] )
+ return;
crit_count[cpu]--;
ASSERT(crit_count[cpu] >= 0);
}
extern void criticalregion_exit(void);
extern void ASSERT_no_criticalregion(void);
extern void disable_criticalregion_checking(void);
-extern void enable_criticalregion_checking(void);
#define spin_lock(_lock) \
do { criticalregion_enter(); _raw_spin_lock(_lock); } while (0)
#define ASSERT_no_criticalregion() ((void)0)
#define disable_criticalregion_checking() ((void)0)
-#define enable_criticalregion_checking() ((void)0)
#define spin_lock(_lock) _raw_spin_lock(_lock)
#define spin_trylock(_lock) _raw_spin_trylock(_lock)